# coding=utf-8

from django.contrib import admin
from blog.models import Article


class ArticleAdmin(admin.ModelAdmin):
    list_display = ('title', 'id', 'category')
    search_fields = ('title', 'category')
    list_filter = ('create_time', 'category')
    date_hierarchy = 'create_time'
    # raw_id_fields = ('')      # 处理外键字段


# Register your models here.

admin.site.register(Article, ArticleAdmin)
